package com.whl.FileManager;

import java.awt.*;

public class FileMain {
    public static void main(String[] args) {
        MainFrame myFrame = new MainFrame();
        myFrame.setTitle("GUI文件管理器");
        myFrame.setVisible(true);
        int windowWidth = myFrame.getWidth(); //获得窗口宽
        int windowHeight = myFrame.getHeight(); //获得窗口高
        Toolkit kit = Toolkit.getDefaultToolkit(); //定义工具包
        Dimension screenSize = kit.getScreenSize(); //获取屏幕的尺寸
        int screenWidth = screenSize.width; //获取屏幕的宽
        int screenHeight = screenSize.height; //获取屏幕的高
        myFrame.setLocation(screenWidth/2-windowWidth/2, screenHeight/2-windowHeight/2);//设置窗口居中显示
        myFrame.setSize(800, 480);
        myFrame.setVisible(true);
    }
}
